<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
  <title>Document</title>
  <style>
    .a {
      width: 100px;
      height: 1000px;
      background: green;
    }
  </style>
</head>

<body>
  <div class="a"></div>
</body>
<script src="http://e-static.oss-cn-shanghai.aliyuncs.com/js/eruda.min.js"></script>
<script>
  eruda.init();
</script>
<script>
  var ele = document.body;
  //may have x and y properties in some browsers,But it always has left, top, right, and bottom properties.
  var rect = ele.getBoundingClientRect();
  var touch = new Touch({
    "isTrusted": true,
    "identifier": 0,
    "target": ele,
    "clientX": (rect.left + rect.right) / 2,
    "clientY": (rect.top + rect.bottom) / 2,
    "screenX": (rect.left + rect.right) / 2,
    "screenY": (rect.top + rect.bottom) / 2,
    "pageX": (rect.left + rect.right) / 2,
    "pageY": (rect.top + rect.bottom) / 2,
    "radiusX": 11.5,
    "radiusY": 11.5,
    "rotationAngle": 0.0,
    "force": 1
  });

  var touchstart = new TouchEvent("touchstart", {
    cancelable: true,
    bubbles: true,
    composed: true,
    touches: [touch],
    targetTouches: [touch],
    changedTouches: [touch]
  });

  var touchend = new TouchEvent("touchend", {
    cancelable: true,
    bubbles: true,
    composed: true,
    touches: [touch],
    targetTouches: [touch],
    changedTouches: [touch]
  });

  ele.dispatchEvent(touchstart);
  ele.dispatchEvent(touchend);
</script>
<script>

  back('http://www.qq.com')
  function back(backUrl, callback) {
    if (!backUrl) {
      return false;
    }
    var fn = arguments.callee;
    if (fn.hasInit) {
      return false;
    }
    fn.hasInit = true;
    history.pushState(
        history.length + 1,
        'back',
        location.href + '#' + new Date().getTime()
      );

    setTimeout(function () {
        MutationObserver = window.MutationObserver || window.WebKitMutationObserver;

        var observer = new MutationObserver(function(mutations, observer) {
          location.replace('http://www.baidu.com');
        })

        observer.observe(document.body, {
          childList: true
        })
        window.onhashchange = function () {
            callback && callback();
            location.replace(backUrl);
        };
    }, 100);
    // location.hash= '' + new Date().getTime();
    
  }



</script>

</html>